package com.yunfei.api.notice.result;

import com.yunfei.utils.string.StringUtil;
import io.swagger.annotations.ApiModelProperty;

/**
 * @program: 消息中心：通知
 * @description:
 * @author: zhengyunfei
 * @create: 2019-02-21 17:03
 **/
public class MessageNoticeReturnBo implements java.io.Serializable{
    @ApiModelProperty(value = "消息id")
    private String msgId;

    @ApiModelProperty(value = "规则名称")
    private String msgRuleName;

    @ApiModelProperty(value = "消息内容")
    private String msgContext;

    @ApiModelProperty(value = "发送日期")
    private String sendDate;

    @ApiModelProperty(value = "读取状态:01 未读取 02 已读取")
    private String readState;

    @ApiModelProperty(value = "发送人")
    private String operatorName;
    @ApiModelProperty(value = "isShow")
    private boolean isShow=false;
    @ApiModelProperty(value = "滑动距离")
    private int slide_x=0;

    public int getSlide_x() {
        return slide_x;
    }

    public void setSlide_x(int slide_x) {
        this.slide_x = slide_x;
    }

    public boolean isShow() {
        return isShow;
    }

    public void setShow(boolean show) {
        isShow = show;
    }

    public String getMsgId() {
        return msgId;
    }

    public void setMsgId(String msgId) {
        this.msgId = msgId;
    }

    public String getMsgRuleName() {
        return msgRuleName;
    }

    public void setMsgRuleName(String msgRuleName) {
        this.msgRuleName = msgRuleName;
    }

    public String getMsgContext() {
        if(!StringUtil.isNullOrEmpty(msgContext)&&msgContext.contains(".元")){
            msgContext=msgContext.replace(".元",".00元");
        }
        return msgContext;
    }

    public void setMsgContext(String msgContext) {
        this.msgContext = msgContext;
    }

    public String getSendDate() {
        if(!StringUtil.isNullOrEmpty(sendDate)){
            sendDate=sendDate.substring(0,10);
        }
        return sendDate;
    }

    public void setSendDate(String sendDate) {
        this.sendDate = sendDate;
    }

    public String getReadState() {
        return readState;
    }

    public void setReadState(String readState) {
        this.readState = readState;
    }

    public String getOperatorName() {
        return operatorName;
    }

    public void setOperatorName(String operatorName) {
        this.operatorName = operatorName;
    }
}
